package cn.itsuorce.service.impl;

import cn.itsuorce.domain.Department;
import cn.itsuorce.domain.Employee;
import cn.itsuorce.domain.Systemdictionarydetail;
import cn.itsuorce.mapper.EmployeeMapper;
import cn.itsuorce.query.EmployeeQuery;
import cn.itsuorce.service.IEmployeeService;
import cn.itsuorce.utils.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(readOnly = true,propagation = Propagation.SUPPORTS)
public class EmployeeServiceImpl extends BaseServiceImpl<Employee, EmployeeQuery> implements IEmployeeService {

    @Autowired
    private EmployeeMapper employeeMapper;

    /**
     * 根据id查询部门经理
     * @param job_id
     * @return
     */
    @Override
    @Transactional
    public List<Employee> findByJob_id(Long job_id) {
        return employeeMapper.findByJob_id(job_id);
    }

    /**
     * 查询职位
     * @param job_id
     * @return
     */
    @Override
    @Transactional
    public List<Systemdictionarydetail> managerjobs(Long job_id) {
        return employeeMapper.managerjobs(job_id);
    }


}
